<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}======
        <obj :qq='list'>
            111111
            <p>我是no1</p>
            <!-- <p slot='uu'  slot-scope='demo'>
                我是no2
                {{demo.tt.name}}
            </p> -->

            <template slot='uu' slot-scope='demo'>
                <p >
                    我是no2
                    {{demo.tt.name}}
                </p>
            </template>
        </obj>
    </div>
    <script type='text/javascript'>

        var obj = {
            props: ['qq'],
            template: `<div>
                我是插槽
               <header>
                    <slot ></slot>
               </header>
               <main>
                    <ul>
                        <li v-for='item in  qq'>
                            {{item.id}}===={{item.name}}
                            <slot name='uu' :tt='item'></slot>
                        
                        </li>
                    </ul>
                   
               </main>
            </div>`
        }
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',
                list: [
                    { id: '1', name: 'jack' },
                    { id: '2', name: 'jack2' },
                    { id: '3', name: 'jack3' },
                ]
            },
            components: {
                obj
            }
        });
    </script>
</body>

</html>